<?php
session_start();
require 'common.php';
require 'db.php';

$_SESSION['uid']=1;

$obj->caching = true;//开启缓存
$obj->cache_lifetime = 30;//缓存时间

$obj->register_block("nocache", "nocache", false);

function nocache($params, $content, &$obj) {
    return $content;
}

if(!$obj->is_cached('index.html',$_SERVER['REQUEST_URI']))
{
	$stu = query("select * from stu where id={$_GET['id']}");
	$obj->assign('stu',$stu[0]);
}

$obj->display('index.html',$_SERVER['REQUEST_URI']);